import * as os from 'os';
import * as fs from 'fs';
import * as path from 'path';

export function getMysqlUsernameAndPassword(){
    const homedir = os.homedir();
    const usernamePath = path.join(homedir, '.book-pro', 'username');
    const username = fs.readFileSync(usernamePath).toString().trim();
    const passPath = path.join(homedir, '.book-pro', 'passwd');
    const passwd = fs.readFileSync(passPath).toString().trim();
    return {username, passwd};
}
    
 